function AmazonArt()
{
	var me = this;
	var error = ""
	var logoRequest_ = new XMLHttpRequest();
	var number_of_results = -1;
	var ASIN = "";
	var num = 0;
	var Art_URL = "";
	var last_artist = "";
	var last_title = "";
		
	this.nextImage = function() {
		if (num == number_of_results) {
			num = 0;
		} else {
			num++;
		}
		this.fetch_art(last_artist, last_title);
	}
	
	this.getURL = function() {
		return Art_URL;
	}
	
	this.getASIN = function() {
		return ASIN;
	}
	
	this.fetch_art = function(artist, title) {
		Art_URL = "";
		ASIN = "";
		if (artist == undefined) {return;}
		if (title == undefined) {return;}
		last_title = title.replace(/ /g,"+");
		last_title = last_title.replace(/[\n\r\t]/g,"");
		last_artist = artist.replace(/ /g,"+");
		last_artist = last_artist.replace(/[\n\r\t]/g,"");
		var URL = "http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Version=2005-03-23&Operation=ItemSearch&ContentType=text%2Fxml&SubscriptionId=0H3CPPFTKSS7DT7ZPQ82&SearchIndex=Music&Artist=" + last_artist + "&Title=" + last_title + "&ResponseGroup=Images";
		//alert(URL);
		try {
		  logoRequest_.open("GET", URL, true);
		} catch (e) {
		  return;
		}

		logoRequest_.onreadystatechange = function(){ me.incoming()};

		try {
		  logoRequest_.send();
		} catch (e) {
			error = "bad things";
		  return;
		}
	}

	this.incoming = function() {
		if (logoRequest_.readyState != 4) { return; }
		if (logoRequest_.status != 200) {
			error = "State is not 200... this is bad.";
			return;
		}
		var xmldoc = logoRequest_.responseXML;
		var root = xmldoc.getElementsByTagName("ItemSearchResponse")[0];
		var items = root.childNodes.item(1);
		var TotalResults = items.childNodes.item(1);
		number_of_results = TotalResults.text;
		if (number_of_results > 0) {
			var s = parseInt(options.getValue("size")) + 1;
			var t = 3 + num;
			var Item = items.childNodes.item(t);
			ASIN = Item.childNodes.item(0).text;
			if (Item.childNodes.length < s) { s = Item.childNodes.length - 1; }
			var LargeImage = Item.childNodes.item(s);
			Art_URL = LargeImage.childNodes.item(0).text;
		}
	}
}